<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<s:form theme="simple" action="findBySmartSearch.htm">
	<table border="0" cellpadding="6" cellspacing="0" width="100%">
		<tbody>
			<tr>
				<td>
					<table border="0" cellpadding="0" cellspacing="0">
						<tbody>
							<tr>
								<td>
									<a href="#" class="breadcrumb-link"><s:text name="%{type.description}" /></a>
								</td>
								<td class="breadcrumb-link-arrow">
									<s:property value="#attr.categoryOptions.menuLineAndHomeSeparator" escape="false" />
								</td>
								<td>
									<s:iterator value="categoriesList" var="categories" status="status">
										<s:property value="%{categoriesList[#status.index]}" />
										<s:if test="#status.last == false"><s:property value="#attr.categoryOptions.menuLineSeparator" escape="false" /></s:if>
									</s:iterator>
								</td>
								<td style="padding-left: 10px">
									<b class="common-bold-text"><s:text
											name="allItemsForSale.sortby" /> </b>
									<s:select list="#{'':'--Select Value--','endsoon':'Time: ending soonest','newlist':'Time: newly listed','endtoday':'Time: ending today','newtoday':'Time: new today'}" name="sortBy" cssClass="textfield" onchange="document.forms[0].submit()" value="%{sortBy}" />
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
			<tr>
				<td width="100%">
					<table width="100%">
						<tr>
							<td width="5%" align="center" valign="top" class="grid-header-bg grid-header-text">
								<input type="checkbox" name="check_list" id="check_list" value="<s:property value="#attr.row.itemId"/>"  />
							</td>
							<td width="10%" align="center" valign="top" class="grid-header-bg grid-header-text">
								<s:text name="photo" />
							</td>
							<td align="center" width="25%" valign="top" class="grid-header-bg grid-header-text">
								Title
							</td>
							<td align="center" width="10%" valign="top" class="grid-header-bg grid-header-text">
								Quantity
							</td>
							<td align="center" width="10%" valign="top" class="grid-header-bg grid-header-text">
								Shipping cost
							</td>
							<td align="center" width="10%" valign="top" class="grid-header-bg grid-header-text">
								Price
							</td>
							<td align="center" width="10%" valign="top" class="grid-header-bg grid-header-text">
								Bids
							</td>
							<td align="center" width="20%" valign="top" class="grid-header-bg grid-header-text">
								Time left
							</td>
						</tr>
					</table>
					<s:set var="size" value="%{pageSize}" />
					<display:table name="itemList" cellpadding="0" size="${size}" style="width: 100%;" cellspacing="1" requestURI="" id="row" class="common-text" pagesize="${size}">
						<display:column class="grid-bg common-text">
							<table width="100%">
								<tr>
									<td width="5%"  align="center" valign="top" class="grid-bg common-text">
										<input type="checkbox" name="check_list" id="check_list" value="<s:property value="#attr.row.itemId"/>"  />
									</td>
									<td width="10%"  align="center" valign="middle" class="grid-bg common-text">
									<s:if test="#attr.row.image != null && #attr.row.image != ''">
										<a href=""> <img src="servlet/ImageServlet?dto=Items&id=<s:property value="#attr.row.itemId"/>" alt="" class="product-border" height="45" width="45"></a>
									</s:if>
									<s:else><img src="images/no_image.gif" alt="No Image" height="45" width="45"/></s:else>
									</td>
									<td align="center" valign="top" width="25%" class="grid-bg common-text">
										<a href="showItem.htm?cid=<s:property value="#attr.row.itemId" />&p=myOffersWanted"><s:property value="#attr.row.title"/></a>
									</td>
									<td align="center" valign="top" width="10%" class="grid-bg common-text">
										<s:property value="#attr.row.quantity" />
									</td>
									<td align="center" valign="top" width="10%" class="grid-bg common-text">
										<s:property value="#attr.row.shipPayment" />
									</td>
									<td align="center" valign="top" width="10%" class="grid-bg common-text">
										<s:property value="#attr.row.buyPrice"/>
									</td>
									<td align="center" valign="top" width="10%" class="grid-bg common-text">
										0
									</td>
									<td align="center" valign="top" width="20%" class="grid-bg common-text">
										<s:date name="#attr.row.endTime" nice="true" />
									</td>
								</tr>
							</table>
						</display:column>
					</display:table>
				</td>
			</tr>
			<tr>
				<td class="lMenu" align="right" width="50%">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td><img src="images/middle/btn-grey-left1.gif" alt=" " width="6" height="23" /></td>
							<td class="btn-grey-middle1 "><s:submit name="Compare" value="Compare item" action="deleteOrCompareItems" cssClass="submit-btn-common" /></td>
							<td><img src="images/middle/btn-grey-right1.gif" alt=" " width="6" height="23" /></td>
						</tr>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
	<s:hidden name="titleValue" value="%{titleValue}" />
	<s:hidden name="searchIn" value="%{searchIn}" />
	<s:hidden name="ItemType" value="%{ItemType}" />
	<s:hidden name="categories" value="%{categories}" />
	<s:hidden name="locations" value="%{locations}" />
	<s:hidden name="languages" value="%{languages}" />
	<s:hidden name="city" value="%{city}" />
	<s:hidden name="quantity" value="%{quantity}" />
	<s:hidden name="bidderId" value="%{bidderId}" />
	<s:hidden name="sellerId" value="%{sellerId}" />
	<s:hidden name="itemId" value="%{itemId}" />
	<s:hidden name="buyFrom" value="%{buyFrom}" />
	<s:hidden name="buyTo" value="%{buyTo}" />
	<s:hidden name="priceFrom" value="%{priceFrom}" />
	<s:hidden name="priceTo" value="%{priceTo}" />
	<s:hidden name="endTime" value="%{endTime}" />
	<s:hidden name="pageSize" value="%{pageSize}" />
</s:form>